<html>
  <head>
    <title>yub.js | web command-line</title>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
    <meta name=viewport content="width=device-width, initial-scale=1">

    <link rel="shortcut icon" href="favicon.ico?v=2">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:800' rel='stylesheet' type='text/css'>
    <link rel="search" type="application/opensearchdescription+xml" title="yub.js" href="xml"/>

    <link id="stylesheet" rel="stylesheet" href="css/default.css">
    <script src="mods.js"></script>

    <script type="text/javascript">
      window.onload = function() { document.getElementById('yub').focus(); } 

      var modson = "on";

      if (typeof(mods) == 'undefined') {
        modson = "off";
      }

var engines=[{n:"about",a:"",d:"Information about yub.js",f:"https://github.com/dohliam/yub"},{n:"g",a:"https://www.google.com/search?q=%s",d:"Google Search",f:"https://google.com/"},{n:"gim",a:"https://www.google.com/search?tbm=isch&q=%s",d:"Google Image Search",f:"https://images.google.com/"},{n:"gmail",a:"https://mail.google.com/mail/u/0/#search/%s",d:"Gmail",f:"https://gmail.com/"},{n:"drive",a:"https://drive.google.com/#search/%s",d:"Google Drive",f:"https://drive.google.com/"},{n:"am",a:"https://www.amazon.com/exec/obidos/external-search?mode=blended&keyword=%s",d:"Amazon.com Product Search",f:"https://www.amazon.com/"},{n:"gt",a:"https://translate.google.com/#auto/en/%s",d:"Google Auto-Translate Text",f:"https://translate.google.com"},{n:"gtu",a:"https://translate.google.com/translate?u=%s",d:"Google Auto-Translate URL",f:"https://translate.google.com"},{n:"gb",a:"https://books.google.com/books?q=%s&btnG=Search+Books",d:"Google Books Search",f:"https://books.google.com"},{n:"gfl",a:"https://google.com/search?q=%s&btnI=I%27m+Feeling+Lucky",d:"Google Feeling Lucky Search",f:"https://google.com"},{n:"gm",a:"https://maps.google.com/maps?q=%s&output=classic",d:"Google Maps Search",f:"https://maps.google.com"},{n:"gs",a:"https://scholar.google.com/scholar?q=%s",d:"Google Scholar Search",f:"https://scholar.google.com"},{n:"gmt",a:"https://www.timeanddate.com/worldclock/results.html?query=%s",d:"Time and Date for any Location",f:"https://timeanddate.com/worldclock"},{n:"weather",a:"https://openweathermap.org/find?q=%s",d:"Weather from OpenWeatherMap",f:"https://openweathermap.org/"},{n:"wbm",a:"https://web.archive.org/web/*/%s",d:"Wayback Machine Internet Archive of URL",f:"https://archive.org"},{n:"whois",a:"https://www.whois.sc/%s",d:"Whois URL &amp; IP Address Listing",f:"https://whois.sc"},{n:"gwhois",a:"https://gwhois.org/%s",d:"GWhois DNS & IP search",f:"https://gwhois.org"},{n:"wco",a:"https://commons.wikimedia.org/wiki/Special:Search?search=%s",d:"Wikimedia Commons Search",f:"https://commons.wikimedia.org/"},{n:"wp",a:"https://en.wikipedia.org/?search=%s",d:"Wikipedia",f:"https://en.wikipedia.org/"},{n:"wv",a:"https://en.wikivoyage.org/?search=%s",d:"Wikivoyage",f:"https://en.wikivoyage.org/"},{n:"wt",a:"https://en.wiktionary.org/?search=%s",d:"Wiktionary",f:"https://en.wiktionary.org/"},{n:"wq",a:"https://en.wikiquote.org/?search=%s",d:"Wikiquote",f:"https://en.wikiquote.org/"},{n:"wn",a:"https://en.wikinews.org/?search=%s",d:"Wikinews",f:"https://en.wikinews.org/"},{n:"ws",a:"https://en.wikisource.org/?search=%s",d:"Wikisource",f:"https://en.wikisource.org/"},{n:"gn",a:"https://news.google.com/news?q=%s",d:"Google News",f:"https://news.google.com"},{n:"yt",a:"https://www.youtube.com/results?search_type=&search_query=%s&aq=f",d:"YouTube Video Search",f:"https://www.youtube.com/"},{n:"fcc",a:"https://www.flickr.com/search/?q=%s&l=4",d:"Flickr cc-by Image Search",f:"https://www.flickr.com/creativecommons/by-2.0/"},{n:"flk",a:"https://www.flickr.com/search?text=%s",d:"Flickr Image Search",f:"https://www.flickr.com/"},{n:"play",a:"https://play.google.com/store/search?q=%s&c=apps&price=1",d:"Google Play Store Search",f:"https://play.google.com/"},{n:"opc",a:"https://openclipart.org/search/?query=%s",d:"Open Clipart Search",f:"https://openclipart.org/"},{n:"gten",a:"https://translate.google.com/translate_t#%s|en",d:"Google Translate page for specified language -> English",f:"https://translate.google.com/"},{n:"cache",a:"https://google.com/search?q=cache:%s&strip=1",d:"Google text-only cache of a webpage",f:"https://google.com"},{n:"cat",a:"https://google.com/search?q=cache:%s&strip=1",d:"output webpage text from Google cache",f:"https://google.com"},{n:"yn",a:"https://news.search.yahoo.com/search?p=%s",d:"Yahoo News",f:"https://news.yahoo.com/"},{n:"onelook",a:"https://www.onelook.com/?w=%s&ls=a",d:"Onelook Dictionary Search",f:"https://www.onelook.com/"},{n:"olr",a:"https://www.onelook.com/?w=*&loc=revfp2&clue=%s",d:"OneLook Reverse Dictionary",f:"https://www.onelook.com/reverse-dictionary.shtml"},{n:"ud",a:"https://www.urbandictionary.com/define.php?term=%s",d:"Urban Dictionary Search",f:"https://www.urbandictionary.com/"},{n:"dic",a:"https://dictionary.reference.com/browse/%s",d:"Dictionary.com",f:"https://dictionary.com/"},{n:"thes",a:"https://www.wordreference.com/thesaurus/%s",d:"WordReference.com English Thesaurus",f:"https://www.wordreference.com/thesaurus/"},{n:"ted",a:"https://www.ted.com/search?q=%s",d:"TED Talks",f:"https://ted.com"},{n:"r",a:"https://reddit.com/r/%s",d:"Reddit",f:"https://reddit.com"},{n:"ddg",a:"https://duckduckgo.com/?q=%s",d:"DuckDuckGo Search",f:"https://duckduckgo.com/"},{n:"ext",a:"https://filext.com/file-extension/%s",d:"FILExt - File Extension Search",f:"https://filext.com/"},{n:"ebay",a:"https://www.ebay.com/sch/i.html?_nkw=%s",d:"Ebay",f:"https://www.ebay.com/"},{n:"tw",a:"https://twitter.com/%s",d:"Twitter",f:"https://twitter.com/"},{n:"tws",a:"https://twitter.com/search?q=%s",d:"Twitter Search",f:"https://twitter.com/search-advanced"},{n:"imgur",a:"https://imgur.com/search?q=%s",d:"Imgur - Image Sharer",f:"https://imgur.com/"},{n:"gpdf",a:"https://www.google.com/search?q=filetype:pdf+%s",d:"Google PDF Search",f:"https://www.google.com/search?q=filetype:pdf"},{n:"gfim",a:"https://www.google.com/search?tbm=isch&as_q=%s&tbs=sur:fmc",d:"Google Free Image Search",f:"https://images.google.com/"},{n:"ngram",a:"https://books.google.com/ngrams/graph?content=%s",d:"Google Books Ngram Viewer",f:"https://books.google.com/ngrams"},{n:"gnas",a:"https://www.google.com/search?q=%s site:news.google.com/newspapers",d:"Google News Archive Search",f:"https://news.google.com/newspapers"},{n:"gsite",a:"https://www.google.com/search?q=site:%s",d:"Google Site Search",f:"https://google.com/"},{n:"hn",a:"https://hn.algolia.com/?q=%s",d:"Hacker News",f:"https://news.ycombinator.com/"},{n:"how",a:"https://www.wikihow.com/?search=%s",d:"wikiHow - How to do anything",f:"https://www.wikihow.com/"},{n:"ifixit",a:"https://www.ifixit.com/Guide/search/%s",d:"iFixit - The free repair manual",f:"https://www.ifixit.com/"},{n:"y",a:"https://search.yahoo.com/search;?p=%s",d:"Yahoo",f:"https://yahoo.com"},{n:"yim",a:"https://images.search.yahoo.com/search/images;?p=%s",d:"Yahoo Image Search",f:"https://images.search.yahoo.com/"},{n:"yv",a:"https://video.search.yahoo.com/search/video;?p=%s",d:"Yahoo Video Search",f:"https://video.search.yahoo.com/"},{n:"ym",a:"https://maps.yahoo.com/place/?addr=%s",d:"Yahoo Maps",f:"https://maps.yahoo.com"},{n:"b",a:"https://www.bing.com/search?q=%s",d:"Bing Search",f:"https://www.bing.com/"},{n:"bim",a:"https://www.bing.com/images/search?q=%s",d:"Bing Image Search",f:"https://www.bing.com/images/"},{n:"btr",a:"",d:"Bing Translator",f:"https://www.bing.com/translator/"},{n:"bn",a:"https://www.bing.com/news/search?q=%s",d:"Bing News",f:"https://www.bing.com/news/"},{n:"bm",a:"https://www.bing.com/maps/?where1=%s",d:"Bing Maps",f:"https://www.bing.com/maps/"},{n:"bv",a:"https://www.bing.com/videos/search?q=%s",d:"Bing Videos",f:"https://www.bing.com/videos/"},{n:"gut",a:"https://www.gutenberg.org/ebooks/search/?query=%s",d:"Project Gutenberg",f:"https://www.gutenberg.org/"},{n:"forvo",a:"https://www.forvo.com/word/%s",d:"Forvo Pronunciations",f:"https://www.forvo.com/"},{n:"gc",a:"https://code.google.com/hosting/search?q=%s",d:"Google Code",f:"https://code.google.com/"},{n:"sf",a:"https://sourceforge.net/directory?q=%s",d:"SourceForge",f:"https://sourceforge.net/"},{n:"git",a:"https://github.com/search?q=%s",d:"GitHub",f:"https://github.com/"},{n:"bbc",a:"https://www.bbc.co.uk/search?q=%s",d:"BBC News",f:"https://www.bbc.com/news/"},{n:"dw",a:"https://www.dw.de/search/english/%s/category/9097/",d:"Deutsche Welle - English (English)",f:"https://www.dw.de/"},{n:"nhken",a:"https://www2.nhk.or.jp/nhkworld/search/query.cgi?qt=%s",d:"NHK World - English",f:"https://www3.nhk.or.jp/nhkworld/"},{n:"fr24en",a:"https://www.france24.com/en/search/?Search[term]=%s&Search[page]=1",d:"France 24 (en) - International News 24/7",f:"https://www.france24.com/en/"},{n:"rfien",a:"https://www.english.rfi.fr/search/sinequa_search/%s",d:"RFI (en)",f:"https://www.english.rfi.fr/"},{n:"abc",a:"https://www.radioaustralia.net.au/international/search/%s",d:"ABC Radio Australia",f:"https://www.radioaustralia.net.au/"},{n:"gg",a:"https://groups.google.com/forum/#!search/%s",d:"Google Groups",f:"https://groups.google.com/"},{n:"yg",a:"https://groups.yahoo.com/neo/search?query=%s",d:"Yahoo Groups",f:"https://groups.yahoo.com/"},{n:"so",a:"https://stackoverflow.com/search?q=%s",d:"Stack Overflow",f:"https://stackoverflow.com/"},{n:"yw",a:"",d:"Yahoo Weather",f:"https://weather.yahoo.com/"},{n:"yelp",a:"https://www.yelp.com/search?find_desc=%s",d:"Yelp",f:"https://www.yelp.com/"},{n:"cnn",a:"https://edition.cnn.com/search/?query=%s",d:"CNN International",f:"https://edition.cnn.com/"},{n:"rci",a:"https://www.rcinet.ca/en/?s=%s",d:"Radio Canada International - English",f:"https://www.rcinet.ca/en/"},{n:"cbc",a:"https://www.cbc.ca/gsa/?q=%s",d:"CBC News - Canadian Broadcasting Corporation",f:"https://www.cbc.ca/news"},{n:"db",a:"https://www.dropbox.com/home/%s",d:"Dropbox",f:"https://dropbox.com"},{n:"ibn",a:"https://ibnlive.in.com/searcher/search.php?searchq=%s",d:"CNN-IBN News - Indian Broadcasting Network (English)",f:"https://ibnlive.in.com/"},{n:"voa",a:"https://www.voanews.com/search/search2.aspx#all|%s|0|allzones|min|now",d:"Voice of America News (English)",f:"https://www.voanews.com/"},{n:"rpen",a:"https://radio.cz/en/search/?query=%s",d:"Radio Prague (en)",f:"https://radio.cz/en"},{n:"xhen",a:"http://search.news.cn/language/search.jspa?id=en&t=1&t1=0&ss=&ct=&n1=%s&button=ok",d:"Xinhua English (en)",f:"http://www.news.cn/english/"},{n:"ymail",a:"",d:"Yahoo Mail",f:"https://mail.yahoo.com"},{n:"mail",a:"",d:"Mail.com",f:"https://www.mail.com/"},{n:"hmail",a:"",d:"Hotmail",f:"https://hotmail.com"},{n:"omail",a:"",d:"Outlook.com E-mail",f:"https://outlook.com"},{n:"dd",a:"https://downdetector.com/search/?q=%s",d:"Down Detector",f:"https://downdetector.com/"},{n:"isup",a:"https://www.downforeveryoneorjustme.com/%s",d:"Down For Everyone Or Just Me",f:"https://www.downforeveryoneorjustme.com/"},{n:"dfeojm",a:"https://www.downforeveryoneorjustme.com/%s",d:"Down For Everyone Or Just Me",f:"https://www.downforeveryoneorjustme.com/"},{n:"ip",a:"",d:"What Is My IP",f:"https://www.whatismyip.com/"},{n:"ggv",a:"https://www.google.com/search?tbm=vid&q=%s",d:"Google Video Search",f:"https://video.google.com/"},{n:"gflights",a:"https://www.google.ca/flights/#search;t=%s",d:"Google Flights Search",f:"https://flights.google.com/"},{n:"trends",a:"https://www.google.ca/trends/explore#q=%s",d:"Google Trends",f:"https://www.google.com/trends/"},{n:"sp",a:"https://startpage.com/do/search?query=%s",d:"Startpage Web Search",f:"https://startpage.com/"},{n:"spim",a:"https://startpage.com/do/search?cat=pics&query=%s",d:"Startpage Image Search",f:"https://startpage.com/"},{n:"spv",a:"https://startpage.com/do/search?cat=video&query=%s",d:"Startpage Video Search",f:"https://startpage.com/"},{n:"spsite",a:"https://startpage.com/do/search?query=site:%s",d:"Startpage Site Search",f:"https://startpage.com/"},{n:"ix",a:"https://ixquick.com/do/search?q=%s",d:"Ixquick Search Engine",f:"https://www.ixquick.com/"},{n:"ixim",a:"https://ixquick.com/do/search?cat=pics&query=%s",d:"Ixquick Image Search",f:"https://ixquick.com/"},{n:"ixv",a:"https://ixquick.com/do/search?cat=video&query=%s",d:"Ixquick Video Search",f:"https://ixquick.com/"},{n:"ixsite",a:"https://ixquick.com/do/search?q=site:%s",d:"Ixquick Site Search",f:"https://www.ixquick.com/"},{n:"vi",a:"https://vimeo.com/search?q=%s",d:"Vimeo Videos",f:"https://vimeo.com/"},{n:"fspam",a:"https://www.stopforumspam.com/ipcheck/%s",d:"Stop Forum Spam - IP Check",f:"https://www.stopforumspam.com/"},{n:"lmd",a:"https://mondediplo.com/spip.php?page=recherche&recherche=%s",d:"Le Monde diplomatique - English edition",f:"https://mondediplo.com/"},{n:"gv",a:"https://globalvoicesonline.org/?s=%s",d:"Global Voices (en)",f:"https://globalvoicesonline.org/"},{n:"eun",a:"",d:"Euronews (en)",f:"https://www.euronews.com/"},{n:"reu",a:"https://www.reuters.com/search?blob=%s",d:"Reuters",f:"https://www.reuters.com/"},{n:"swi",a:"https://www.swissinfo.ch/action/eng/40468904/search?query=%s",d:"SwissInfo (en)",f:"https://www.swissinfo.ch/eng"},{n:"rt",a:"https://rt.com/search/everywhere/term/%s/",d:"RT - Russia Today (en)",f:"https://rt.com/"},{n:"blm",a:"https://search1.bloomberg.com/search/?content_type=all&q=%s",d:"Bloomberg News",f:"https://www.bloomberg.com/news/"},{n:"ascii",a:"https://www.network-science.de/ascii/ascii.php?TEXT=%s&x=8&y=7&FONT=_all+fonts+with+your+text_&RICH=no&FORM=left&STRE=no",d:"ASCII Generator",f:"https://www.network-science.de/ascii/"},{n:"del",a:"https://delicious.com/tag/%s",d:"Delicious.com tag search",f:"https://delicious.com/"},{n:"wa",a:"https://www.wolframalpha.com/input/?i=%s",d:"Wolfram Alpha",f:"https://www.wolframalpha.com/"},{n:"npr",a:"https://www.npr.org/templates/search/index.php?searchinput=%s",d:"NPR - National Public Radio",f:"https://www.npr.org/"},{n:"mo",a:"https://www.google.com/gwt/n?u=%s",d:"Show mobile version of page (via Google)",f:"https://www.google.com/"},{n:"js",a:"https://developer.mozilla.org/en-US/search?q=%s",d:"Search JavaScript documentation",f:"https://developer.mozilla.org/en-US/docs/Web/JavaScript"},{n:"rb",a:"https://ruby-doc.com/search.html?q=%s",d:"Search Ruby documentation",f:"https://ruby-doc.com/"},{n:"php",a:"https://www.php.net/%s",d:"Search PHP documentation",f:"https://www.php.net/"},{n:"py",a:"https://docs.python.org/3/search.html?q=%s",d:"Search Python documentation",f:"https://docs.python.org/"},{n:"sh",a:"https://mywiki.wooledge.org/ParsingLs?action=fullsearch&context=180&value=%s&fullsearch=Text",d:"Search Bash documentation on BashFAQ",f:"https://mywiki.wooledge.org/BashFAQ/"},{n:"jshint",a:"",d:"JSHint, a JavaScript Code Quality Tool",f:"https://jshint.com/"},{n:"flint",a:"https://www.flickr.com/photos/tags/%s/interesting/",d:'Search Flickr for images, sorted by "interestingness"',f:"https://www.flickr.com/"},{n:"lman",a:"https://man.he.net/?section=all&topic=%s",d:"Linux Man Pages Online",f:"https://man.he.net/"},{n:"hl",a:"https://news.search.yahoo.com/news/rss?ei=UTF-8&p=%s&c=&eo=UTF-8",d:"Show a list of Yahoo News headlines on a particular topic",f:"https://news.search.yahoo.com/"},{n:"imdb",a:"https://www.imdb.com/find?q=%s",d:"IMDB - International Movie Database",f:"https://www.imdb.com/"},{n:"ccm",a:"http://ccmixter.org/api/query?search=%s",d:"ccMixter",f:"http://ccmixter.org/"},{n:"ccmt",a:"http://ccmixter.org/api/query?tags=%s",d:"ccMixter Tag Search",f:"http://ccmixter.org/"},{n:"jam",a:"https://www.jamendo.com/en/search?qs=q=%s",d:"Jamendo - Royalty Free Music",f:"https://www.jamendo.com/"},{n:"sc",a:"https://soundcloud.com/search?q=%s",d:"SoundCloud",f:"https://soundcloud.com/"},{n:"ar",a:"https://archive.org/search.php?query=%s",d:"Internet Archive",f:"https://archive.org/"},{n:"medium",a:"https://medium.com/search?q=%s",d:"Medium Search",f:"https://medium.com/"}];

var tips=[{n:"!",d:'Type ! before any bare url (e.g., "google.com") to go directly to the site'},{n:"calc",d:"Calculate simple mathematical expressions"},{n:"==",d:'Use with calc to test the equivalence of two expressions (e.g., "calc (25+2)==(28-1)")'},{n:">",d:'Use with calc to test for the greater of two expressions (e.g., "calc 8>4")'},{n:"<",d:'Use with calc to test for the lesser of two expressions (e.g., "calc 8<4")'},{n:"^",d:'Use with calc for exponents (e.g., "calc 5^3")'},{n:"~",d:'Use with calc to round to the nearest integer (e.g., "calc ~32.56")'},{n:"rand ",d:"Without an argument: returns a random number between 1-100"},{n:"rand <i>number</i>",d:"With an argument: returns a random number between 1-<i>number</i>"},{n:"whatis",d:"Type whatis and any command to see a description of what it does"},{n:"where",d:"Show full search and default URLs for any command"},{n:"search",d:"Search through all commands for the given string"},{n:"mods",d:"List all additional personal modules, if any"},{n:"dup",d:"Check for duplicate entries"},{n:"pop ",d:"Open YubSearch in a new window"},{n:"pop <i>commands</i>",d:'Open multiple shortcuts simultaneously in different tabs (e.g., "pop g y b")'},{n:"pop <i>commands</i> -t <i>searchterm</i>",d:'Open multiple searches for <i>searchterm</i> in different tabs (e.g., "pop gim yim bim -t supernova")'},{n:"pop -u <i>urls</i>",d:'Open a list of <i>urls</i> (e.g., "pop -u http://google.com http://yahoo.com")'},{n:"tips",d:"List all available commands"},{n:"ls ",d:"Same as <b>list</b>"},{n:"ls <i>command</i>",d:"Same as <b>whatis</b>"},{n:"list",d:"Show all available shortcuts and commands"},{n:"count",d:"Show a count of the total number of commands available"},{n:"help",d:"Same as <b>tips</b>, display this help message"},{n:"s",d:"Same as <b>search</b>"},{n:"c",d:"Same as <b>calc</b>"},{n:"w",d:"Same as <b>whatis</b>"},{n:"wh",d:"Same as <b>where</b>"},{n:"t",d:"Same as <b>time</b>"},{n:"day",d:"Displays the day of the week and the ISO date for the current locale"},{n:"date",d:"Same as <b>day</b>"},{n:"d",d:"Same as <b>date</b>"},{n:"link ",d:"Print the current url"},{n:"link <i>command</i>",d:"Generate a permalink to the given command"},{n:"href",d:"Same as <b>link</b>"},{n:"clear",d:"Clear all output"},{n:"create ",d:"Create a new command"},{n:"create <i>commandname</i>",d:"Create a new command called <i>commandname</i>; will alert if command already exists"},{n:"shuffle ",d:"Shuffle text randomly (default is to delimit by spaces, or tabs if present)"},{n:"shuffle -t <i>delimiter</i>",d:"Shuffles text randomly using  <i>delimiter</i> to separate entries"},{n:"sort ",d:"Sorts text (default is to delimit by spaces, or tabs if present)"},{n:"sort -t <i>delimiter</i>",d:"Sorts text using <i>delimiter</i> to separate entries"},{n:"uniq ",d:"Sorts text and filters out duplicate entries (default is to delimit by spaces, or tabs if present)"},{n:"uniq -t <i>delimiter</i>",d:"Sorts text and filters out duplicates using <i>delimiter</i> to separate entries"},{n:"uniqd ",d:"Finds duplicates in given text (default is to delimit by spaces, or tabs if present)"},{n:"uniqd -t <i>delimiter</i>",d:"Finds duplicates in given text using <i>delimiter</i> to separate entries"},{n:"wc ",d:"Counts number of words in given text (default is to delimit by spaces, or tabs if present)"},{n:"wc -c",d:"Counts number of characters in given text"},{n:"wc -t <i>delimiter</i>",d:"Counts number of words in given text using <i>delimiter</i> to separate entries"},{n:"ucase",d:"Converts text to UPPER CASE"},{n:"upcase",d:"Same as <b>ucase</b>"},{n:"lcase",d:"Converts text to lower case"},{n:"downcase",d:"Same as <b>lcase</b>"},{n:"ccase",d:"Converts text to Capital Case"},{n:"capcase",d:"Same as <b>ccase</b>"},{n:"caps",d:"Same as <b>ccase</b>"},{n:"watch",d:"Watch a playlist of embedded videos based on the given search term"},{n:"ytp",d:"YouTube Player - Same as <b>watch</b>"},{n:"whoami",d:"Shows some information about your system"},{n:"rand site",d:"Go to random site from list of shortcuts"},{n:"rand git",d:"Go to random GitHub repository"},{n:"rand img",d:"Go to random image"},{n:"random ",d:"Same as <b>rand</b>"},{n:"echo ",d:"Says hello"},{n:"echo <i>string</i>",d:"Prints the given string"},{n:"timer",d:"Opens a stopwatch timer"},{n:"stopwatch",d:"Same as <b>timer</b>"},{n:"sticky ",d:"An editable sticky note with local storage"},{n:"sticky -r",d:"Clear sticky local storage"},{n:"sticky <i>message</i>",d:"Open a new sticky note with the contents of <i>message</i>"},{n:"notepad",d:"Opens a editable lined notepad with persistent local storage"},{n:"notepad -r",d:"Clear notepad local storage"},{n:">",d:"Redirect any command to first Google search result (e.g. > wpde Battle of Hastings)"},{n:"time ",d:"Print the current local time and date"},{n:"time <i>locale</i>",d:"Print the current time and date formatted for a specific language or locale"}];

function yubComm(nub){var nublc=nub.toLowerCase().replace(/[\s\+]$/,""),finished="",o=document.getElementById("output"),y=document.getElementById("yub");if(""==nublc&&(o.innerHTML="Please enter a command.",finished="done"),"count"==nublc){var total=0;total="off"==modson?engines.length+tips.length:engines.length+tips.length+mods.length,o.innerHTML="There are currently "+total+" commands available!",y.value="",finished="done"}if("clear"==nublc&&(o.innerHTML="",document.getElementById("create").style.display="none",document.getElementById("timer").style.display="none",y.value="",finished="done"),"dup"==nublc){"off"==modson?lsshort(engines,tips):lsshort(engines,tips,mods);for(var dupArr=[],i=0;i<allArray.length;i++)dupArr.push(allArray[i].replace(/\t.*/,""));var uniqArr=uniqd(dupArr);0==uniqArr.length?o.innerHTML="no duplicates found!":o.innerHTML=uniqArr.join("<br>"),finished="done"}var shcut=nublc.replace(/^([>a-z]+) .*/,"$1"),sterm=nub.replace(/[\s\+]+$/,"").replace(/^[>A-Za-z]+ (.*)/,"$1"),stermlc=sterm.toLowerCase();if(addr="",loc="","list"==shcut||"ls"==shcut){if(0==/\s/.test(nublc)){shcutList="<table>","off"==modson?lsshort(engines,tips):lsshort(engines,tips,mods);for(var i=0;i<allArray.length;i++)shcutList=shcutList+"<tr><td>"+allArray[i].replace(/\t/,"</td><td>")+"</td></tr>";o.innerHTML=shcutList+"</table>",y.value=""}else yubSearch("whatis "+sterm),y.value="";finished="done"}if(/^((https*|ftp|file|chrome):\/\/)|(about:)/.test(nub)&&(addr=nub,window.location=addr,finished="done"),/^\!/.test(nub)&&(addr=nub.replace(/^\! */,"http://"),window.location=addr,finished="done"),"search"==shcut||"s"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please enter a search string.";else{"off"==modson?lslong(engines):lslong(engines,mods);for(var re=new RegExp(sterm.toLowerCase()),shcutList="<table>",noresult=0,i=0;i<longArray.length;i++)if(re.test(longArray[i].toLowerCase())){var l=longArray[i].split("\t");shcutList=shcutList+"<tr><td>"+l[0]+"</td><td>"+l[1]+"</td></tr>",noresult++}o.innerHTML=shcutList+"</table>",y.value=""}0==noresult&&(o.innerHTML="No matching commands found. Try a different search string!"),finished="done"}if("whatis"==shcut||"w"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please enter a command name.";else{"off"==modson?lsshort(engines,tips):lsshort(engines,tips,mods);for(var noresult=0,i=0;i<allArray.length;i++)allArray[i].replace(/\s*\t.*/,"")==sterm&&(o.innerHTML=allArray[i].replace(/\t/," = "),noresult++);0==noresult&&(o.innerHTML='Command "'+sterm+'" not found. Please try again.')}finished="done"}if("where"==shcut||"wh"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please enter a command name.";else{"off"==modson?lslong(engines):lslong(engines,mods);for(var noresult=0,i=0;i<longArray.length;i++){var l=longArray[i].split("\t");l[0]==sterm&&(o.innerHTML=l[0]+" = "+l[1]+"<br><div class='grey'>Search: "+l[2]+"<br>Default: "+l[3]+"</div>",noresult++,y.value="")}0==noresult&&(o.innerHTML='Command "'+sterm+'" not found. Please try again.')}finished="done"}if("calc"!=shcut&&"c"!=shcut||(o.innerHTML=eval(sterm.replace(/[a-zA-Z]/g,"").replace(/([\d\.]+)\^([\d\.]+)/g,"Math.pow($1,$2)").replace(/~([\d\.]+)/g,"Math.round($1)")),finished="done"),"random"==shcut||"rand"==shcut){if("site"==sterm){lslong(engines,mods);var rfloor=longArray.length;rfloor=Math.floor(Math.random()*rfloor);var addr=longArray[rfloor].split("\t")[3];window.location=addr}else if("git"==sterm)randgit();else if("img"==sterm){var addr="https://imgur.com/random";window.location=addr}else{var rfloor=sterm.replace(/[^\d]/g,"");rfloor=""==rfloor?101:parseInt(rfloor)+1,o.innerHTML=Math.floor(Math.random()*rfloor)}finished="done"}if("pop"==shcut){if("off"==modson?lslong(engines):lslong(engines,mods),0!=/\s/.test(nublc)){if(1==/-u/.test(sterm)){a=/-u (.*)/.exec(sterm)[1];for(var httpArr=a.split(" "),i=0;i<httpArr.length;i++)window.open(httpArr[i]);return!0}if(1==/-t/.test(sterm)){for(var a=sterm.split(" -t "),comm=a[0],text=a[1],commArr=comm.split(" "),httpArr=[],c=0;c<commArr.length;c++)for(var i=0;i<longArray.length;i++){var l=longArray[i].split("\t");commArr[c]==l[0]&&httpArr.push(l[2].replace(/%s/,text))}for(var i=0;i<httpArr.length;i++)window.open(httpArr[i]);return!0}for(var comm=sterm.split(" "),httpArr=[],c=0;c<comm.length;c++)for(var i=0;i<longArray.length;i++){var l=longArray[i].split("\t");comm[c]==l[0]&&httpArr.push(l[3])}for(var i=0;i<httpArr.length;i++)window.open(httpArr[i]);return!0}window.open(document.URL,"_blank","location=yes,height=570,width=520,scrollbars=yes,status=yes"),window.open(window.location,"_self").close(),finished="done"}if("href"==shcut||"link"==shcut){var url=location.href;if(0==/\s/.test(nublc))o.innerHTML="The current url is: "+url;else{var encurl=encodeURI(url+"?"+sterm);o.innerHTML="The current url is: "+url+"<br><br>You entered the following command: "+sterm+"<br><a href='"+encurl+"'>Permalink</a>"}y.value="",finished="done"}if("echo"==shcut&&(0==/\s/.test(nublc)?o.innerHTML="Hi there! :)":o.innerHTML=sterm,y.value="",finished="done"),"sort"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please input some text to sort.";else{var d=delimit(sterm);o.innerHTML=d.sort().join("<br>")}y.value="",finished="done"}if("shuffle"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please input some text to shuffle.";else{var d=delimit(sterm);o.innerHTML=shuffle(d).join("<br>")}y.value="",finished="done"}if("uniq"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please input some text as an argument to uniq.";else{var d=delimit(sterm);o.innerHTML=uniq(d).join("<br>")}y.value="",finished="done"}if("uniqd"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please input some text as an argument to uniqd.";else{var d=delimit(sterm);o.innerHTML=uniqd(d).join("<br>")}y.value="",finished="done"}if("ucase"!=shcut&&"upcase"!=shcut||(0==/\s/.test(nublc)?o.innerHTML="Please input some text to convert to upper case.":o.innerHTML=sterm.toUpperCase(),finished="done"),"lcase"!=shcut&&"downcase"!=shcut||(0==/\s/.test(nublc)?o.innerHTML="Please input some text to convert to lower case.":o.innerHTML=sterm.toLowerCase(),finished="done"),"ccase"!=shcut&&"capcase"!=shcut&&"caps"!=shcut||(0==/\s/.test(nublc)?o.innerHTML="Please input some text to convert to initial caps.":o.innerHTML=sterm.toLowerCase().replace(/(^|\s+)(.)/g,function(e,t,n){return t+n.toUpperCase()}),finished="done"),"wc"==shcut){if(0==/\s/.test(nublc))o.innerHTML="Please input some text to count.";else if(1==/^\-c /.test(sterm))c=sterm.replace(/^\-c /,""),o.innerHTML=c.split(/./).length-1;else{var d=delimit(sterm);o.innerHTML=d.length}y.value="",finished="done"}if("watch"!=shcut&&"ytp"!=shcut||(0==/\s/.test(nublc)?o.innerHTML="Please provide a search term for something you would like to watch.":(p='<iframe width="640" height="390" src="https://www.youtube.com/embed?listType=search&list='+sterm+'" frameborder="0" allowfullscreen></iframe>',o.innerHTML=p),finished="done"),"timer"!=shcut&&"stopwatch"!=shcut||(timer(),y.value="",finished="done"),"whoami"==shcut&&(o.innerHTML="<table><tr><td>Browser code name: </td><td>"+navigator.appCodeName+"</tr><tr><td>Browser offical name: </td><td>"+navigator.appName+"</tr><tr><td>Browser Version: </td><td>"+navigator.appVersion+"</tr><tr><td>Java enabled? </td><td>"+navigator.javaEnabled()+"</tr><tr><td>Browser Language: </td><td>"+navigator.language+"</tr><tr><td>All languages in order of preference: </td><td>"+navigator.languages+"</tr><tr><td>Browser online? </td><td>"+navigator.onLine+"</tr><tr><td>Current operating system: </td><td>"+navigator.oscpu+"</tr><tr><td>Browser platform: </td><td>"+navigator.platform+"</tr><tr><td>User agent: </td><td>"+navigator.userAgent.replace(/\)/,")<br>")+"</td></tr></table>",y.value="",finished="done"),"sticky"==shcut&&(y.value="",0==/\s/.test(nublc)?(o.innerHTML='<link href="https://fonts.googleapis.com/css?family=Reenie+Beanie" rel="stylesheet" type="text/css"><div class="note" style="width:350px; height:350px; background-color:#ffff88; font-family:\'Reenie Beanie\'; font-size:36px; border-bottom-right-radius: 60px 5px; transform: rotate(-3deg)" id="b" contenteditable="true"></div>',localStorage.sticky?b.innerHTML=[localStorage.sticky]:b.innerHTML="This is an editable sticky. Type something to add notes here.",window.b.setAttribute("oninput","localStorage.sticky=b['innerHTML']"),window.b.focus()):1==/^\-r/.test(sterm)?(localStorage.sticky="",o.innerHTML="Local storage has been cleared.",y.focus()):(localStorage.sticky=sterm,yubComm("sticky"),window.b.focus()),finished="done"),"notepad"==shcut&&(y.value="","-r"==sterm?(localStorage.np="",o.innerHTML="Local storage has been cleared.",y.focus()):(o.innerHTML='<div class="note" style="width:40%; height:50%; background: -webkit-repeating-linear-gradient( top, #FFFAFA, #FFFAFA 35px, #81cbbc 40px ); background: -moz-repeating-linear-gradient( top, snow, snow 38px, #81cbbc 40px ); background: repeating-linear-gradient( top, snow, snow 38px, #81cbbc 40px ); line-height:40px" id="b" contenteditable="true"></div>',localStorage.np?b.innerHTML=[localStorage.np]:b.innerHTML="This is an editable notepad with automatic local storage.\nClick here to add some notes.",window.b.setAttribute("oninput","localStorage.np=b['innerHTML']"),window.b.focus()),finished="done"),">"==shcut){if(0==/\s/.test(nublc))o.innerHTML="To use the > redirect prefix, input a yubnub command and a search term as arguments, for example:<br>> wp Hedgehogs<br>(Uses Google to search Wikipedia and goes automatically to the first result)";else{var surl="",nterm=sterm.replace(/.*?\s(.*)/,"$1");"off"==modson?lslong(engines):lslong(engines,mods),c=0;for(var i=0;i<longArray.length;i++){var l=longArray[i].split("\t");l[0]==sterm.replace(/\s.*/,"")&&(surl=l[3].replace(/(https*:\/\/.*?)\/.*/,"$1"),c++)}if(0==c)o.innerHTML='No command "'+sterm+'" found. Please try again!';else{var gfl="https://google.com/search?q=site:"+surl+"+"+nterm+"&btnI=I%27m+Feeling+Lucky";window.location=gfl}}finished="done"}if("create"==shcut){var cr=document.getElementById("create"),scn=document.getElementById("scname");if(1==/\s/.test(nublc)){"off"==modson?lsshort(engines,tips):lsshort(engines,tips,mods),c=0;for(var i=0;i<allArray.length;i++)allArray[i].replace(/\s*\t.*/,"")==sterm&&c++;0<c?o.innerHTML='A command with the name "'+sterm+'" already exists. Please try another command name.':(cr.style.display="",scn.value=sterm,scn.focus(),scn.select())}else""==cr.style.display?cr.style.display="none":(cr.style.display="",scn.focus(),scn.select());finished="done"}if("time"!=shcut&&"t"!=shcut||(d=new Date,t=d.toLocaleTimeString().replace(/([\d]+:[\d]{2})(:[\d]{2})(.*)/,"$1$3"),iso=d.toISOString().replace(/T.*/,""),df=d.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"}),finished="done","time"!=sterm&&"t"!=sterm&&(df=d.toLocaleDateString(sterm,{weekday:"long",month:"long",day:"numeric"}),finished="done"),o.innerHTML=t+"<br><div class='grey'>"+df+"<br>("+iso+")</div>"),"day"!=shcut&&"date"!=shcut&&"d"!=shcut||(d=new Date,day=d.getDay().toString().replace(/0/,"Sunday").replace(/1/,"Monday").replace(/2/,"Tuesday").replace(/3/,"Wednesday").replace(/4/,"Thursday").replace(/5/,"Friday").replace(/6/,"Saturday"),iso=d.toISOString().replace(/T.*/,""),o.innerHTML=day+"<br><div class='grey'>("+iso+")</div>",finished="done"),"skin"==shcut&&(stylesheet=document.getElementById("stylesheet"),stylesheet.href="css/"+sterm+".css",o.innerHTML='yub.js skin successfully changed to "'+sterm+'"!',finished="done"),"tips"==shcut||"help"==shcut||"man"==shcut){var commList="<table>",noresult=0;if(0==/\s/.test(nublc)){for(var i=0;i<tips.length;i++)commList=commList+"<tr><td>"+tips[i].n+"</td><td>"+tips[i].d+"</td></tr>\n";o.innerHTML=commList.split("\n").sort().join("\n")+"</table>",y.value=""}else{lsshort(tips);for(var noresult=0,i=0;i<allArray.length;i++)allArray[i].replace(/\s*\t.*/,"")==sterm&&(o.innerHTML=allArray[i].replace(/\t/," = "),noresult++);0==noresult&&(o.innerHTML='Command "'+sterm+'" not found. Please try again.')}finished="done"}if("mods"==nublc){if("off"==modson)o.innerHTML="No additional modules loaded.";else{modList="<table>";for(var i=0;i<mods.length;i++)modList=modList+"<tr><td>"+mods[i].n+"</td><td>"+mods[i].d+"</td></tr>\n";o.innerHTML=modList.split("\n").sort().join("\n")+"</table>",y.value=""}finished="done"}for(var i=0;i<engines.length;i++)engines[i].n==shcut&&(finished="done",shcut==stermlc&&0==/\s/.test(nublc)?addr=engines[i].f:(loc=engines[i].a,addr=loc.replace(/%s/,sterm)),window.location=addr);if("on"==modson)for(var i=0;i<mods.length;i++)mods[i].n==shcut&&(finished="done",shcut==stermlc&&0==/\s/.test(nub)?addr=mods[i].f:(loc=mods[i].a,addr=loc.replace(/%s/,sterm)),window.location=addr);""==finished&&(escNub=encodeURIComponent(nub).replace(/'/g,"@39@"),o.innerHTML="Command '"+shcut+"' not found. <input class='button' type='submit' value='edit' onclick=\"editNub('"+escNub+"')\" accesskey='e'><br>Type 'list' or 'ls' to see all commands.",y.value="")}

function yubSearch(e){return yubComm(e),!1}function lsshort(){for(var e=[],t=0;t<arguments.length;t++)for(var n=0;n<arguments[t].length;n++)e.push(arguments[t][n].n+"\t"+arguments[t][n].d);window.allArray=e.sort()}function lslong(e,t){var n=[];if("off"==modson)for(var o=0;o<e.length;o++)n.push(e[o].n+"\t"+e[o].d+"\t"+e[o].a+"\t"+e[o].f);else{for(o=0;o<e.length;o++)n.push(e[o].n+"\t"+e[o].d+"\t"+e[o].a+"\t"+e[o].f);for(o=0;o<t.length;o++)n.push(t[o].n+"\t"+t[o].d+"\t"+t[o].a+"\t"+t[o].f)}window.longArray=n.sort()}function uniq(e){for(var t=[(e=e.sort())[0]],n=1;n<e.length;n++)e[n-1]!==e[n]&&t.push(e[n]);return t}function uniqd(e){for(tmp=new Array(0),tmp2=new Array(0),i=0;i<e.length;i++)contains(tmp,e[i])?(tmp2.length+=1,tmp2[tmp2.length-1]=e[i]):(tmp.length+=1,tmp[tmp.length-1]=e[i]);return tmp2}function contains(e,t){for(j=0;j<e.length;j++)if(e[j]==t)return!0;return!1}function delimit(e){var t=new Array(0);return/^\-t /.test(e)?(d=e.replace(/^\-t (.*?) .*/,"$1"),t=e.replace(/^\-t (.*?) /,"").split(d)):t=/\t/.test(e)?e.split("\t"):e.split(" "),t}function shuffle(e){for(var t,n,o=e.length;0!==o;)n=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[n],e[n]=t;return e}function createYub(){var e=document.getElementById("scname").value.toLowerCase(),t=document.getElementById("saddr").value,n=document.getElementById("defurl").value,o=document.getElementById("descr").value.replace(/"/g,'\\"');prompt("Copy the code below to your mods.js file:",'  {"n":"'+e+'", "a":"'+t+'", "d":"'+o+'", "f":"'+n+'"},')}function timer(){document.getElementById("timer").style.display="",window.sec=min=hour=0,window.clock=0}function stopWatch(){clearTimeout(window.clock),window.sec++,59<=window.sec&&(window.sec=0,min++),59<=min&&(min=0,hour++),document.getElementById("sec").innerHTML=window.sec<10?"0"+window.sec:window.sec,document.getElementById("min").innerHTML=min<10?"0"+min:min,document.getElementById("hour").innerHTML=hour<10?"0"+hour:hour,window.clock=setTimeout("stopWatch()",1e3)}function pause(){return clearTimeout(window.clock),!1}function play(){return stopWatch(),!1}function reset(){return clearTimeout(window.clock),window.sec=min=hour=0,document.getElementById("sec").innerHTML="00",document.getElementById("min").innerHTML="00",!(document.getElementById("hour").innerHTML="00")}function clearTimer(){document.getElementById("timer").style.display="none"}function randgit(){function e(){var e=n(0,6e7);console.log(e);var t=new XMLHttpRequest;t.open("GET","https://api.github.com/repositories?since="+e,!0),t.send(),t.onreadystatechange=function(e){o(e,t)}}function n(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function o(e,t){if(4==t.readyState&&200==t.status){var n=JSON.parse(t.responseText)[0].full_name;location.href="https://github.com/"+n}}e()}function editNub(e){yub=document.getElementById("yub"),yub.value=decodeURIComponent(e.replace(/@39@/g,"'")),yub.focus()}

    </script>
  </head>
  <body onload="var geturl = location.href; if (/\?/.test(geturl) == true) { var args = /\?(.*)/.exec(geturl)[1]; args=/\+/.test(args)?args.replace(/\+/g,' ').replace(/\s+$/,''):args; yubSearch(decodeURIComponent(args)); finished = 'done';}">
    <center>
    <div id="ybox">
      <h2>yub.js</h2>
      <h3>web command-line</h3>
        <form>
            <input class="inputbox" type="text" value="" autofocus="autofocus" autocomplete="off" id="yub">
            <input class="button" type="submit" value="yub!" onclick="return yubSearch(document.getElementById('yub').value)">
            <div class="grey"><p class='small'>type 'list' to see all available search shortcuts, or 'tips' for more commands</p></div>
        </form>
    </div>
    <div id="output">&nbsp;</div>
    </center>

    <div id="create" style="display:none;">
    <center>
      <h4>Create a new yub command!</h4>
        <table>
          <tr><td>Shortcut Name:</td><td><input type="text" id="scname" size="50" placeholder="Enter the command name here"></td></tr>
          <tr><td>Search Address:</td><td><input type="text" id="saddr" size="50" placeholder="Enter search URL with search term replaced by %s"></td></tr>
          <tr><td>Default URL:</td><td><input type="text" id="defurl" size="50" placeholder="Enter the address to go to if search term is blank"></td></tr>
          <tr><td>Description:</td><td><input type="text" id="descr" size="50" placeholder="Enter a description or site title"></td></tr>
        </table><br>
      <input id="createcomm" type="button" class="button" value="Create New Command!" accesskey='c' onclick='createYub();'>
    </center>
    </div>

    <div id="container" style="margin: 0 auto; width: 300px; padding: 20px;">
    <div id="timer" style="display:none; position:absolute;">
      <span style="font-size:small; float:right; cursor:pointer;" onclick='clearTimer();' title="click to close">x</span><br>
      <center>
        <span id="hour">00</span>:<span id="min">00</span>:<span id="sec">00</span><br><br>
        <input type="button" class="button" id="start" onClick="stopWatch()" accesskey='s' title="Shift+Alt+S" value="Start">
        <input type="button" class="button" id="pause" onClick="pause()" accesskey='p' title="Shift+Alt+P" value="Pause">
        <input type="button" class="button" id="play" onClick="play()" accesskey='o' title="Shift+Alt+O" value="Continue">
        <input type="button" class="button" id="reset" onClick="reset()" accesskey='r' title="Shift+Alt+R" value="Reset">
      </center>
    </div>
    </div>

  </body>
</html>
